// 获取用户权限
export const checkRoles = (roles, role) => {
    let a = true
    if (roles != undefined && roles != null) {
        if (typeof role === 'string') {
            // 等于字符串 true 时，开启
            if (role != 'true') {
                a = roles.includes(role)
            }
        } else if (Array.isArray(role)) {
            a = role.some(item => roles.includes(item));
        }
    }
    return a
}